#ifndef __BSP_SPI_H__
#define __BSP_SPI_H__

#include "stm32f10x.h"

#define ENC28J60_CSL()      (GPIOB->ODR &= ~(1<<12))
#define ENC28J60_CSH()      (GPIOB->ODR |= 1<<12)

#define ENC28J60_RSTL()  // (GPIOE->ODR &= ~(1<<1))
#define ENC28J60_RSTH()  // (GPIOE->ODR |= 1<<1)

#define ENC_SPI_ReadWrite   bsp_SPI2ReadWrite
#define ENC_SPI_Init        bsp_InitSPI2

void bsp_InitSPI2(void);
uint8_t bsp_SPI2ReadWrite(uint8_t dat);

#endif
